// DSSocketClient.h: interface for the DSSocketClient class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JSSOCKETCLIENT_H__FB35A9DF_A776_4FE0_8923_21D59A9988D8__INCLUDED_)
#define AFX_JSSOCKETCLIENT_H__FB35A9DF_A776_4FE0_8923_21D59A9988D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "remoting\Server.h"
#include <httpext.h>
#include <log4cxx/logger.h>
#include <log4cxx/propertyconfigurator.h>

using namespace log4cxx;
using namespace log4cxx::helpers;


typedef void (WINAPI * ISAPI_HttpExtensionProc)(EXTENSION_CONTROL_BLOCK*);
typedef void (WINAPI * ISAPI_GetExtensionVersion)(HSE_VERSION_INFO*);
typedef void (WINAPI * ISAPI_TerminateExtension)(DWORD);


using COM::CClientAgent;
using COM::socket_t;

class DSSocketClient : public CClientAgent  
{
public:
	DSSocketClient();
	virtual ~DSSocketClient();

protected:
	virtual void Run ();
	virtual void OnCancel ();
	
	bool IsBreak();

	bool SwitchRequest(DWORD dwLen,DWORD dwStrand,std::vector<unsigned char>& RecvAry);

	void OnRequest ();

private:
	COM::mutex m_Mutex;
	bool m_bCancel;
};

#endif // !defined(AFX_JSSOCKETCLIENT_H__FB35A9DF_A776_4FE0_8923_21D59A9988D8__INCLUDED_)
